Skip to content

feat(fleet-queue): AUTH-04 managed body section capability policy (code#9431) - #9554

Merged
dezren39 merged 1 commit into
mainfrom
queue/16032-9431-auth04-managed-body
Nov 13, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/16032-9431-auth04-managed-body

Conversation

@dezren39

@dezren39 dezren39 commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Implements AUTH-04 (code#9431, task 16032): the managed body section capability policy in a new pure module pkgs/fleet/crates/fleet-queue/src/work/authority.rs (plus src/work/mod.rs and the lib.rs module line).

Gate: design PR #9225 merged 2026-11-13T13:36:36Z; contract doc validated on main at 84131d4 before implementation.

What the policy encodes (design component 9208, managed content honesty constraint):

  • Default unsupported: the documented GitHub body update contract has no conditional compare-and-swap, so absent a verified conditional-write capability a managed-section update is denied — never attempted best-effort and never labelled optimistic locking.
  • Best-effort marked-section updates exist only behind a separate explicit opt-in (BestEffortOptIn) that names an approver and acknowledges the human-clobber risk; the guarantee is labelled best-effort/no-CAS with the race disclosed.
  • Typed, non-mutating refusals: malformed/duplicate markers, outside-section bytes altered vs the baseline snapshot, and concurrent edits inside the section.
  • Timeout after PATCH is unknown: reconcile_after_patch_timeout requires a re-read and resolves Applied / NotApplied / Diverged / StillUnknown before any new plan.
  • Planned updates preserve outside-section bytes exactly.

No adapter (gh.rs) changes: capability is not proven, so per the slice the adapter is touched only if capability is proven. No persistence, no new crate, no production rollout.

Tests (oracle first, per the slice done command):

  • Listed: cargo test --manifest-path pkgs/fleet/Cargo.toml -p fleet-queue --lib --features client,queue-broker pmo_auth_managed_body_requires_verified_conditional_write_capability -- --list → 1 test listed.
  • Named test: 1 passed, 303 filtered out.
  • Module: work::authority 6 passed, 0 failed (covers outside bytes altered, malformed markers, concurrent edit, timeout after PATCH, opt-in gate, exact outside-byte preservation).

Refs #9431 (does not close the design issue; this is its scoped implementation follow-on).


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…de#9431)

Default unsupported absent a verified conditional-write capability; best-effort marked-section updates only behind an explicit opt-in acknowledging human-clobber risk, never labelled optimistic locking. Typed refusals for malformed markers, outside-bytes alteration, and concurrent edits; timeout-after-PATCH reconciles as unknown until re-read. Named oracle pmo_auth_managed_body_requires_verified_conditional_write_capability listed and passing; work::authority module 6/6 tests pass.
@dezren39
dezren39 requested a review from a team as a code owner November 13, 2026 13:51
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-13T13:51:42.175282Z
We couldn’t complete this review. Comment @codex review to try again.
5f86006 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@dezren39

Copy link
Copy Markdown
Member Author

@codex review

Disposition note (task 16032, lane code-a): the first Codex review run failed to complete (review summary comment 6854881972, no findings posted). Retrying once here. If the retry also fails to run, there are no Codex findings to disposition on this PR; verification rests on the targeted tests recorded in the PR body (named oracle listed + passing, work::authority 6/6).

@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 29 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fa76b4e7-5096-4c4e-81ea-8c6909fa4751
Commits

Reviewing files that changed from the base of the PR and between 84131d4 and 5f86006.

Files selected for processing: 3

  • pkgs/fleet/crates/fleet-queue/src/lib.rs
  • pkgs/fleet/crates/fleet-queue/src/work/authority.rs
  • pkgs/fleet/crates/fleet-queue/src/work/mod.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@dezren39
dezren39 merged commit 9181d7f into main Nov 13, 2026
1 check passed
@dezren39
dezren39 deleted the queue/16032-9431-auth04-managed-body branch November 13, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant